<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改页面</title>
    <link rel="stylesheet" href="/static/pengpai/component/pear/css/pear.css" />
</head>
<body>
<form class="layui-form" action="">
    <div class="mainBox">
        <div class="main-container">

            <input type="hidden" name="id" lay-verify="required" lay-reqtext="用户名不能为空" placeholder="请输入参数名" th:value="${config.id}" READONLY class="layui-input">
            <div class="layui-form-item">
                <label class="layui-form-label">地址</label>
                <div class="layui-input-block">
                    <input type="text" name="location" th:value="${config.location}" lay-verify="title"
                           autocomplete="off" placeholder="" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">电话</label>
                <div class="layui-input-block">
                    <input type="text" name="phone" th:value="${config.phone}" lay-verify="title"
                           autocomplete="off" placeholder="" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">电子邮件</label>
                <div class="layui-input-block">
                    <input type="text" name="email" th:value="${config.email}" lay-verify="title" autocomplete="off"
                           placeholder="" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">工作时间</label>
                <div class="layui-input-block">
                    <input type="text" name="worktime" th:value="${config.worktime}" lay-verify="title" autocomplete="off"
                           placeholder="" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">ICP</label>
                <div class="layui-input-block">
                    <input type="text" name="icp" th:value="${config.icp}" lay-verify="title" autocomplete="off"
                           placeholder="" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">公司名称</label>
                <div class="layui-input-block">
                    <input type="text" name="cname" th:value="${config.cname}" lay-verify="title" autocomplete="off"
                           placeholder="" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">b1</label>
                <div class="layui-input-block">
                    <input type="text" name="b1" th:value="${config.b1}" lay-verify="title" autocomplete="off"
                           placeholder="" class="layui-input">
                </div>
            </div><div class="layui-form-item">
            <label class="layui-form-label">b2</label>
            <div class="layui-input-block">
                <input type="text" name="b2" th:value="${config.b2}" lay-verify="title" autocomplete="off"
                       placeholder="" class="layui-input">
            </div>
        </div>



            <div class="layui-form-item">
                <label class="layui-form-label">c1</label>
                <div class="layui-input-block">
                    <input type="text" name="c1" th:value="${config.c1}" lay-verify="title" autocomplete="off"
                           placeholder="" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">c2</label>
                <div class="layui-input-block">
                    <input type="text" name="c2" th:value="${config.c2}" lay-verify="title" autocomplete="off"
                           placeholder="" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">c3</label>
                <div class="layui-input-block">
                    <input type="text" name="c3" th:value="${config.c3}" lay-verify="title" autocomplete="off"
                           placeholder="" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">c4</label>
                <div class="layui-input-block">
                    <input type="text" name="c4" th:value="${config.c4}" lay-verify="title" autocomplete="off"
                           placeholder="" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">c5</label>
                <div class="layui-input-block">
                    <input type="text" name="c5" th:value="${config.c5}" lay-verify="title" autocomplete="off"
                           placeholder="" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">c6</label>
                <div class="layui-input-block">
                    <input type="text" name="c6" th:value="${config.c6}" lay-verify="title" autocomplete="off"
                           placeholder="" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">c7</label>
                <div class="layui-input-block">
                    <input type="text" name="c7" th:value="${config.c7}" lay-verify="title" autocomplete="off"
                           placeholder="" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">c8</label>
                <div class="layui-input-block">
                    <input type="text" name="c8" th:value="${config.c8}" lay-verify="title" autocomplete="off"
                           placeholder="" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">c9</label>
                <div class="layui-input-block">
                    <input type="text" name="c9" th:value="${config.c9}" lay-verify="title" autocomplete="off"
                           placeholder="" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">c10</label>
                <div class="layui-input-block">
                    <input type="text" name="c10" th:value="${config.c10}" lay-verify="title" autocomplete="off"
                           placeholder="" class="layui-input">
                </div>
            </div>


            <div class="button-container" style="left: 15px">
                <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit=""
                        lay-filter="user-save">
                    <i class="layui-icon layui-icon-ok"></i>
                    提交
                </button>


            </div>

    </div>

</form>
<script src="/static/pengpai/component/layui/layui.js"></script>
<script src="/static/pengpai/component/pear/pear.js"></script>
<script>
    layui.use(['form', 'jquery'], function() {
        let form = layui.form;
        let $ = layui.jquery;

        form.on('submit(user-save)', function(data) {
            console.log(data)
            $.post("/webConfigProperty/update",data.field,function(r){
                console.info(r.code);
                if(r.code === 200){
                    layer.msg('更新成功');
                    // parent.location.reload();
                }else{
                    layer.msg('提交失败！');
                }
            });
        });
        form.on('submit(footer)', function(data) {
            console.log(data)
            $.get('/createFooter',data.field,function (r){
                console.log(r);
                if(r.code === 200){
                    layer.msg('生成成功');

                }else{
                    layer.msg('提交失败！');
                }

            });
        });
        form.on('submit(product)', function() {
            console.log("product")
            $.get('/staticPage?code=product',function (r){
                console.log(r);
                if(r.code === 200){
                    layer.msg('生成成功');

                }else{
                    layer.msg('提交失败！');
                }

            });
        });
        form.on('submit(honor)', function() {
            console.log("product")
            $.get('/staticPage?code=honor',function (r){
                console.log(r);
                if(r.code === 200){
                    layer.msg('生成成功');

                }else{
                    layer.msg('提交失败！');
                }

            });
        });


    })
</script>
<script>
</script>
</body>
</html>
